package com.itheima;

import java.util.Scanner;

public class test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个包含数组和字母的字符串");
        String s = sc.next();
        StringBuilder sbNmb = new StringBuilder();
        StringBuilder sbEng = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c<='9'&&c>='0'){
                sbNmb.append(c);
            }else if((c>='a'&&c<='z')||(c>='A'&&c<='Z')){
                sbEng.append(c);
            }
        }
        String s1 = sbEng.toString();
        sbNmb.append(s1);
        String s2 = sbNmb.toString();
        System.out.println(s2);
    }
}
